<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>18.1</title>
</head>

<body>
    <div id="app">
        <div>
            <input name="name" v-model="name"><span v-if="name">你的名字是{{name}}</span>
        </div>
        <div>
            <input name="age" v-model="age"><span v-if="age">你的年龄是{{age}}</span>
        </div>
        <div>
            <input name="gender" v-model="gender"><span v-show="gender">你的性别是{{gender}}</span>
        </div>

    </div>
</body>
<script src="../lib/vue.js"></script>
<script src="js/main.js"></script>

</html>